GXVectorVectorizeShape
QuickDraw GX sends theGXVectorVectorizeShape
message to convert a complex shape into simpler, device-level shapes such as polygons. You can override theGXVectorVectorizeShape
message to change the plotting of particular shapes. Your override of theGXVectorVectorizeShape
message must match the following formal declaration:
OSErr MyVectorVectorizeShape (gxShape aShape, long penIndex, gxVectorShapeDataRec *aVectorShapeDataRec);
aShape
- The shape object to be vectorized.
penIndex
- The index of the pen to draw the shape.
aVectorShapeDataRec
- On return, a pointer to a vector shape structure that contains the vector data created from the shape.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX's default implementation ofGXRenderPage
sends theGXVectorVectorizeShape
message when a shape is ready to be converted into simpler device-level shapes. It sends the message to vectorize a specified shape (convert it into line segments). It sends the message after all transfer modes are resolved and all clipping and transforms have been concatenated.QuickDraw GX's default implementation of this message converts shapes into polygons.
You can override this message to effect the plotting of particular shape types. You may find this useful for plotters that can handle certain shapes more easily than the shapes provided by the default implementation. You can completely remove undesired shapes, handle certain shapes entirely, modify shapes prior to forwarding the message, and send some shapes through unmodified.
The
GXVectorVectorizeShape
message is initiated before any style mappings are applied to the shape and before it is converted into a low-level shape. The message is invoked after clipping, color sorting, and transfer-mode resolution are complete. Before the message is sent, all the parent clips and mappings are concatenated with the shape's clip and mapping. The shape is left as close to its original form as possible. For example, text remains text shape and is not converted into a path.You can override this message to customize rendering of certain shapes on your vector device. For example, if you prefer to use the device's native fonts to plot text, glyph, and layout shapes, you can override this message. Note that it is your responsibility to apply style and transforms to the shape.
SPECIAL CONSIDERATIONS
You never send theGXVectorVectorizeShape
message yourself.You can totally override the
GXVectorVectorizeShape
message, or you can partially override it to modify the default processing of certain shape types.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. SEE ALSO
TheGXRenderPage
message is described on page 4-96.The vector shape structure is described on page 4-31.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help